﻿<Window x:Class="WpfApplicationEventsManager.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Canvas>
        <TabControl Canvas.Left="30" Canvas.Top="36" Height="204" Name="tabControl1" Width="435">
            <TabItem Header="Events" Name="tabItemEvents" SizeChanged="tabItemEvents_SizeChanged">
                <Grid>
                    <DataGrid AutoGenerateColumns="False" Height="160" HorizontalAlignment="Left" Margin="0,6,0,0" Name="dataGridEvents" 
                              VerticalAlignment="Top" Width="338" SelectionChanged="dataGridEvents_SelectionChanged" CanUserAddRows="False">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" IsReadOnly="True"/>
                            <DataGridTextColumn Header="Location" Binding="{Binding LocationName}" Width="*" IsReadOnly="True"/>
                            <DataGridTextColumn Header="Category" Binding="{Binding CategoryName}" Width="*" IsReadOnly="True"/>
                            <DataGridTextColumn Header="Date" Binding="{Binding DateTime}" Width="*" IsReadOnly="True"/>
                            <DataGridTextColumn Header="Price" Binding="{Binding Price, StringFormat=c}" Width="*" IsReadOnly="True"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <Button Content="Add" Height="23" HorizontalAlignment="Left" Margin="344,85,0,0" Name="buttonAddEvent" VerticalAlignment="Top" Width="75" Click="buttonAddEvent_Click" />
                    <Button Content="Edit" Height="23" HorizontalAlignment="Left" Margin="344,114,0,0" Name="buttonEditEvent" VerticalAlignment="Top" Width="75" Click="buttonEditEvent_Click" />
                    <Button Content="Delete" Height="23" HorizontalAlignment="Left" Margin="344,143,0,0" Name="buttonDeleteEvent" VerticalAlignment="Top" Width="75" Click="buttonDeleteEvent_Click" />
                </Grid>
            </TabItem>
            <TabItem Header="Categories" Name="tabItemCategories">
                <Grid />
            </TabItem>
            <TabItem Header="Locations" Name="tabItemLocations" SizeChanged="tabItemLocations_SizeChanged">
                <Grid>
                    <DataGrid Height="160" HorizontalAlignment="Left" 
                              Margin="6,6,0,0" Name="dataGridLocations" VerticalAlignment="Top" Width="200" AutoGenerateColumns="False" CanUserDeleteRows="False" SelectionChanged="dataGridLocations_SelectionChanged" CanUserAddRows="False">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Location" Width="*" Binding="{Binding Name}" IsReadOnly="True"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <Button Content="Add" Height="23" HorizontalAlignment="Left" Margin="205,42,0,0" Name="buttonAdd" VerticalAlignment="Top" Width="75" Click="buttonAdd_Click" Grid.Column="1" />
                    <Button Content="Edit" Height="23" HorizontalAlignment="Left" Margin="205,71,0,0" Name="buttonEdit" VerticalAlignment="Top" Width="75" Click="buttonEdit_Click" Grid.Column="1" />
                    <Button Content="Delete" Height="23" HorizontalAlignment="Left" Margin="205,100,0,0" Name="buttonDelete" VerticalAlignment="Top" Width="75" Click="buttonDelete_Click" Grid.Column="1" />
                </Grid>
            </TabItem>
        </TabControl>
    </Canvas>
</Window>
